﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Security;

namespace ALinq.Web.Security
{
     partial class User : MembershipUser
    {
        private string _ProviderName;
        public IEnumerable<Role> Roles
        {
            get { return UserRoles.Select(o => o.Role); }
        }

        internal void SetUserName(string username)
        {
            _UserName = username;
        }


        internal void SetCreationDate(DateTime creationDate)
        {
            _CreationDate = creationDate;
        }

        internal void SetIsApproved(bool isApproved)
        {
            _IsApproved = isApproved;
        }

        internal void SetIsLockedOut(bool isLocked)
        {
            _IsLocked = isLocked;
        }


        internal void SetLastActivityDate(DateTime date)
        {
            _LastActivityDate = date;
        }

        internal void SetLastLoginDate(DateTime dateTime)
        {
            _LastLoginDate = dateTime;
        }

        internal void SetLastPasswordChangedDate(DateTime dateTime)
        {
            _LastPasswordChangedDate = dateTime;
        }

         internal void SetPasswordQuestion( string question)
        {
            this._PasswordQuestion = question;
        }

        public override string ProviderName
        {
            get
            {
                return this._ProviderName;
            }
        }

        internal void SetProviderName(string value)
        {
            this._ProviderName = value;
        }
    }
}